package com.nulp.psycho.db.service;

import com.nulp.psycho.db.dao.impl.UserDao;

public class UserService {

	public <T> void create(T element) {
		new UserDao().create(element);
	}


	public <T> T read(Integer id) {
		return new UserDao().read(id);
	}


	public void delete(Integer id) {
		new UserDao().delete(id);
	}


	public <T> void update(T element) {
		new UserDao().update(element);
	}


	public <T> T getUserByLoginAndPassword(String login, String password) {
		return new UserDao().getUserByLoginAndPassword(login, password);
	}


	public <T> T getUserByLogin(String value) {
		return new UserDao().getUserByLogin(value);
	}

	public <T> T getUserByEmail(String email) {
		return new UserDao().getUserByEmail(email);
	}


	public <T> T getUserByHash(String hash) {
		return new UserDao().getUserByHash(hash);
	}
	
	public <T> T getAllUsers(){
		return new UserDao().getAllUsers();
	}
}
